package com.blue.wechat.invoke.spi.media;

import com.alibaba.fastjson.JSON;
import com.blue.wechat.cache.Wechat;
import com.blue.wechat.invoke.BaseInvoker;
import com.blue.wechat.invoke.WechatInvoker;
import com.blue.wechat.invoke.annotation.WechatUrl;
import com.blue.wechat.invoke.model.media.MaterialCount;

/**
 * 获取永久素材总数
 * 
 * @author zhengj
 * @since 1.0 2017年6月10日
 */
@WechatUrl(WechatInvoker.GET_MATERIAL_COUNT)
public class GetMaterialCountInvoker extends BaseInvoker<MaterialCount>
{
	public GetMaterialCountInvoker()
	{
	}

	@Override
	protected WechatInvoker getInvoker()
	{
		return WechatInvoker.GET_MATERIAL_COUNT;
	}

	@Override
	protected MaterialCount handleSuccess(String resp, Wechat wechat)
	{
		MaterialCount mc = JSON.parseObject(resp, MaterialCount.class);
		return mc;
	}
}
